#ifndef FKROOMINTERFACE_H
#define FKROOMINTERFACE_H

#include "FKVisualInterface.h"

#include <QPoint>
#include <QStringList>
#include <QVariant>

class FKActorsModel;

class FKVISUALINTERFACESHARED_EXPORT FKRoomInterface:public FKVisualInterface{
    Q_OBJECT
public:
    FKRoomInterface(QObject *parent = 0);
    ~FKRoomInterface();
    FKActorsModel* actorsModel(){return _actorsModel;}
    void setActorsModel(FKActorsModel* model);
    qint32 activeUser() const{return _activeUser;}
    void setActiveUser(qint32 userID){_activeUser=userID;}
public slots:
    void addChatMessage(QString msg);
    void clearChat();
    void roomStarted();
    void roomLoadingBegan(int val1, int val2);
    void setRoomLoadingProgress(int val1, int val2);
    void addRoomLoadingProgress(int val1, int val2);
    void mouseClicked(QPoint pos, qint32 obj);
protected:
    void setupDefaults();
    void setupContextProperties(QQmlContext* context);
signals:
    void areaClicked(QPoint pos);
    void quitRoomRequested();
    void startRoomRequested();
    void chatMessageRequested(QString msg);
    void clearChatRequest();
    void addChatMessageRequest(FKQmlArgument msg);
    void startRoomLoadingRequest(FKQmlArgument val1, FKQmlArgument val2);
    void setRoomLoadingProgressRequest(FKQmlArgument val1, FKQmlArgument val2);
    void addRoomLoadingProgressRequest(FKQmlArgument val1, FKQmlArgument val2);
    void startRoomRequest();
    void setActorsOptions(FKQmlArgument col, FKQmlArgument m);
    void worldAction(qint32 object, QString subject, QVariant value, qint32 emitter);
private slots:
    void chatMessageRequest(FKQmlArgument msg);
    void areaClickRequest(FKQmlArgument x,FKQmlArgument y);
private:
    FKVisualInterfaceView* initialization(QWindow *parent);
    QStringList _chatHistory;
    static const int _maxChatLines;

    FKActorsModel* _actorsModel;
    qint32 _activeUser;
};

#endif // FKROOMINTERFACE_H
